/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DBClasses;

/**
 *
 * @author hendrikde
 */
public class HistoryNode implements Comparable<HistoryNode>{
    
    /*Types:
     * 0--Created Circle
     * 1--Join Circle
     * 2--Post
     * 3--Comment
     * 4--Like Post
     * 5--Like Comment
     */
    private int type;
    private String[] info;
    private String date;
    
    public HistoryNode(int t, String[] i, String d) {
        type=t;
        info = i;
        date = d;
    }
    
    public String getDate() {
        return date;
    }
    
    public int getType(){
        return type;
    }
    
    public String[] getInfo() {
        return info;
    }
    
    public int getInfoSize() {
        return info.length;
    }
    public int compareTo(HistoryNode h) {
        int number = this.getDate().compareTo(h.getDate());
        if (number == 0) {
            return this.getType() - h.getType();
        }

        return number;
    }
}
